package ae.pcfc.cldos.online.common.delegate.provider;

import java.io.FileNotFoundException;

import ae.pcfc.cldos.online.common.delegate.BaseDelegate;
import ae.pcfc.cldos.online.common.delegate.FileHandlerDelegate;
import ae.pcfc.cldos.online.common.facade.FileHandlerFacade;
import ae.pcfc.cldos.online.common.vo.FileVO;


/**
 * File Handler Delegate Implementation for file handling operations
 * @author ammar
 *
 */

public class FileHandlerDelegateImpl extends BaseDelegate implements FileHandlerDelegate {

	public void updateTransferFlag(FileVO fileVO) {
		getServiceLocator().getFacadeService(FileHandlerFacade.class).updateTransferFlag(fileVO);
	}

	public FileVO getFileFromJavaStorageById(Long fileId) throws FileNotFoundException{
		return getServiceLocator().getFacadeService(FileHandlerFacade.class).getFileFromJavaStorageById(fileId);
	}
	
	public void deleteTransferedFiles() {
		getServiceLocator().getFacadeService(FileHandlerFacade.class).deleteTransferedFiles();
	}

	public FileVO getFileFromGSStorageById(Long fileId) throws FileNotFoundException{
		return getServiceLocator().getFacadeService(FileHandlerFacade.class).getFileFromGSStorageById(fileId);
	}

}
